<?php
class App_Module_Admin_Tpl_Base extends Mozg_Templator
{

    public function LoadTemplate($title, $content, array $icons = array())
    {
        $this->title = $title;
        $this->content = $content;
        $this->icons = $icons;
        $this->wide = false;

        return $this->render('_main_block_template.phtml');
    }
    
    public function LoadWideTemplate($title, $content, array $icons = array())
    {
        $this->title = $title;
        $this->content = $content;
        $this->icons = $icons;
		$this->wide = true;
        
        return $this->render('_main_block_template.phtml');
    }
    
    public function LeftBlock($title, $content, array $icons = array())
    {
        $this->title = $title;
        $this->content = $content;
        $this->icons = $icons;
        
        return $this->render('_left_block_template.phtml');
    }

    public function RightBlock($title, $content)
    {
        $this->title = $title;
        $this->content = $content;
        return $this->render('_right_block_template.phtml');
    }
    
    public function MainMenu()
    {
        return $this->render('_main_menu.phtml');
    }

    public function DefaultTmp()
    {
        return $this->render('_template.phtml');
    }

    public function EmptyTmp()
    {
        return $this->render('_empty.phtml');
    }

    public function LoginTmp()
    {
        return $this->render('_login_template.phtml');
    }
    
    protected $_switchLang = false;
    
	public function ShowMultilangBlock($show = false)
	{
		$this->_switchLang = $show;
	}
    
    public function SwitchLang()
    {
    	if (!$this->_switchLang || (sizeof(Mozg_Lang::$langs) < 2)) return '';
    	
    	Mozg::SubAction()->Add('RequiredJS', array($this, 'SwitchLangJS'), array(), 'SwitchLang');
    	return $this->render('_switch_lang.phtml');
    }
    
    public function SwitchLangJS()
    {
    	return $this->render('js/_switch_lang.js');
    }
    
    protected function GetHeaderTitle()
    {
    	return '';
    }
    
    protected function GetHeaderIcons()
    {
    	return '';
    }
}